//
//  HomeSpatialAudioSectionTableViewCell.swift
//  EasePods
//
//  Created by 易先生 on 2024/4/20.
//

import UIKit

class HomeSpatialAudioSectionTableViewCell: TableViewCell {

    override func makeUI() {
        super.makeUI()
        self.backgroundColor = .clear
        self.contentView.backgroundColor = .clear
        self.contentView.addSubview(titleLabel)
        self.contentView.addSubview(iconImageView)
        self.contentView.addSubview(switchView)

        titleLabel.snp.makeConstraints { make in
            make.top.equalToSuperview().offset(4)
            make.leading.equalToSuperview().offset(20)
            make.bottom.equalToSuperview().offset(-16)
        }
        
        iconImageView.snp.makeConstraints { make in
            make.leading.equalTo(titleLabel.snp.trailing).offset(8)
            make.centerY.equalTo(titleLabel)
        }
        
        switchView.snp.makeConstraints { make in
            make.trailing.equalToSuperview().offset(-20)
            make.centerY.equalTo(titleLabel)
        }

    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

    private lazy var titleLabel: Label = {
        let lable = Label()
        lable.font = Fonts.systemFont(ofSize: 16)
        lable.text = R.string.localizable.home_spatial_audio_section_title()
        lable.textColor = R.color.common_3_text()
        return lable
    }()
    
    private lazy var iconImageView: ImageView = {
        let imageView = ImageView()
        imageView.image = R.image.ic_home_tips()
        return imageView
    }()
    
    private lazy var switchView: UISwitch = {
        let view = UISwitch()
        view.onTintColor = R.color.common_27_main_color()
        return view
    }()
}
